package com.stu.demo.base;

import org.junit.After;
import org.junit.Before;
import org.neo4j.driver.v1.AuthTokens;
import org.neo4j.driver.v1.Driver;
import org.neo4j.driver.v1.GraphDatabase;
import org.neo4j.driver.v1.Session;

/**
 * @projectName: learn_used_code
 * @packageName: com.stu.demo.base
 * @className: com.stu.demo.base-> TestBase
 * @createDate: 2022-02-18 11:07
 * @author: ZhangSheng
 * @version: 1.0
 * @description:
 */
public class TestBase {

    protected Driver driver;

    protected Session session;

    @Before
    public void beforeTest(){
        this.driver = GraphDatabase.driver("bolt://192.168.0.2:7687", AuthTokens.basic("neo4j", "880729"));
        this.session = driver.session();
    }

    @After
    public void afterTest(){
        this.session.close();
        this.driver.close();
    }


}
